﻿using System;
using System.Data;
using System.Collections.Generic;
using Chenxin.Lib.Business.Entity;
using Chenxin.Lib.Utility;
using Chenxin.Lib.Business;
using System.Text;

namespace Chenxin.Lib.Business.BLL
{
    /// <summary>
    /// 业务逻辑类t_Preliminary_SubInfo3 的摘要说明。
    /// </summary>
    public class PreLoanInfo
    {
        public PreLoanInfo()
        { }
        #region  成员方法
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3 model)
        {
            Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3 model)
        {
            Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public void Delete(Guid RecordId)
        {
            Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.Delete(RecordId);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3 GetModel(Guid RecordId)
        {
            return Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.GetModel(RecordId);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3 GetModelByRecordId(Guid RecordId)
        {
            return Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.GetModelByRecordId(RecordId);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3 GetLoanModel(Guid RecordId)
        {
            return Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.GetLoanModel(RecordId);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.GetList(strWhere);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3> GetModelList(string strWhere)
        {
            DataSet ds = Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.GetList(strWhere);
            return DataTableToList(ds.Tables[0]);
        }

        /// <summary>
        /// 根据MainId获取买方列表信息
        /// </summary>
        /// <param name="MainId">关联ID</param>
        /// <returns></returns>
        public List<Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3> GetModelListByMainId(string MainId)
        {
            string strSql = string.Empty;
            strSql = string.Format(" MainId='{0}' ", MainId);
            return GetModelList(strSql);
        }

        /// <summary>
        /// 根据MainId获取买方列表信息
        /// </summary>
        /// <param name="MainId">关联ID</param>
        /// <returns></returns>
        public Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3 GetModelByContractId(Guid ContractId)
        {
            return Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.GetModelByContractId(ContractId);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3 GetLoanCode()
        {
            return Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.GetLoanCode();
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetLoanCount(string strWhere)
        {
            return Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.GetLoanCount(strWhere);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3> DataTableToList(DataTable dt)
        {
            List<Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3> modelList = new List<Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3>();
            int rowsCount = dt.Rows.Count;
            if (rowsCount > 0)
            {
                Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3 model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Chenxin.Lib.Business.Entity.t_Preliminary_SubInfo3();
                    if (dt.Rows[n]["RecordId"].ToString() != "")
                    {
                        model.RecordId = new Guid(dt.Rows[n]["RecordId"].ToString());
                    }
                    if (dt.Rows[n]["MainId"].ToString() != "")
                    {
                        model.MainId = new Guid(dt.Rows[n]["MainId"].ToString());
                    }
                    if (dt.Rows[n]["EmpCityId"].ToString() != "")
                    {
                        model.EmpCityId = new Guid(dt.Rows[n]["EmpCityId"].ToString());
                    }
                    if (dt.Rows[n]["EmpCompanyId"].ToString() != "")
                    {
                        model.EmpCompanyId = new Guid(dt.Rows[n]["EmpCompanyId"].ToString());
                    }
                    if (dt.Rows[n]["EmpDepartId"].ToString() != "")
                    {
                        model.EmpDepartId = new Guid(dt.Rows[n]["EmpDepartId"].ToString());
                    }
                    if (dt.Rows[n]["EmployeeId"].ToString() != "")
                    {
                        model.EmployeeId = new Guid(dt.Rows[n]["EmployeeId"].ToString());
                    }
                    if (dt.Rows[n]["OperateCompanyId"].ToString() != "")
                    {
                        model.OperateCompanyId = new Guid(dt.Rows[n]["OperateCompanyId"].ToString());
                    }
                    if (dt.Rows[n]["OperateDepartId"].ToString() != "")
                    {
                        model.OperateDepartId = new Guid(dt.Rows[n]["OperateDepartId"].ToString());
                    }
                    if (dt.Rows[n]["OperateUserId"].ToString() != "")
                    {
                        model.OperateUserId = new Guid(dt.Rows[n]["OperateUserId"].ToString());
                    }
                    if (dt.Rows[n]["ContractId"].ToString() != "")
                    {
                        model.ContractId = new Guid(dt.Rows[n]["ContractId"].ToString());
                    }
                    model.LoanCode = dt.Rows[n]["LoanCode"].ToString();
                    model.LoanInfo = dt.Rows[n]["LoanInfo"].ToString();
                    model.LoanDealMode = dt.Rows[n]["LoanDealMode"].ToString();
                    model.ContractCode = dt.Rows[n]["ContractCode"].ToString();
                    model.EvaluateCorp = dt.Rows[n]["EvaluateCorp"].ToString();
                    model.InsuranceCorp = dt.Rows[n]["InsuranceCorp"].ToString();
                    model.LackInfo = dt.Rows[n]["LackInfo"].ToString();
                    model.ReceiveBank = dt.Rows[n]["ReceiveBank"].ToString();
                    model.LoanXfYear = dt.Rows[n]["LoanXfYear"].ToString();
                    model.LoanSxYear = dt.Rows[n]["LoanSxYear"].ToString();
                    model.LoanZyYear = dt.Rows[n]["LoanZyYear"].ToString();
                    model.SalerPhone = dt.Rows[n]["SalerPhone"].ToString();
                    model.BuyerPhone = dt.Rows[n]["BuyerPhone"].ToString();
                    model.CustomerName = dt.Rows[n]["CustomerName"].ToString();
                    model.IDNum = dt.Rows[n]["IDNum"].ToString();
                    model.GJJyear = dt.Rows[n]["GJJyear"].ToString();
                    model.SYYear = dt.Rows[n]["SYYear"].ToString();
                    model.OrderPlace = dt.Rows[n]["OrderPlace"].ToString();
                    model.SaleName = dt.Rows[n]["SaleName"].ToString();
                    model.SaleIDCard = dt.Rows[n]["SaleIDCard"].ToString();
                    model.OldLoanBank = dt.Rows[n]["OldLoanBank"].ToString();
                    model.EmpCityName = dt.Rows[n]["EmpCityName"].ToString();
                    model.EmpCompanyName = dt.Rows[n]["EmpCompanyName"].ToString();
                    model.EmpDepartName = dt.Rows[n]["EmpDepartName"].ToString();
                    model.EmployeeName = dt.Rows[n]["EmployeeName"].ToString();
                    model.EmpPhone = dt.Rows[n]["EmpPhone"].ToString();
                    model.OperateCompanyName = dt.Rows[n]["OperateCompanyName"].ToString();
                    model.OperateDepartName = dt.Rows[n]["OperateDepartName"].ToString();
                    model.OperateUserName = dt.Rows[n]["OperateUserName"].ToString();
                    model.Address = dt.Rows[n]["Address"].ToString();
                    model.Remark = dt.Rows[n]["Remark"].ToString();
                    model.SLRemark = dt.Rows[n]["SLRemark"].ToString();
                    model.SHRemark = dt.Rows[n]["SHRemark"].ToString();
                    model.FKRemark = dt.Rows[n]["FKRemark"].ToString();
                    if (dt.Rows[n]["SalePrice_T"].ToString() != "")
                    {
                        model.SalePrice_T = decimal.Parse(dt.Rows[n]["SalePrice_T"].ToString());
                    }
                    if (dt.Rows[n]["EvaluateFee"].ToString() != "")
                    {
                        model.EvaluateFee = decimal.Parse(dt.Rows[n]["EvaluateFee"].ToString());
                    }
                    if (dt.Rows[n]["InsuranceFee"].ToString() != "")
                    {
                        model.InsuranceFee = decimal.Parse(dt.Rows[n]["InsuranceFee"].ToString());
                    }
                    if (dt.Rows[n]["AgencyFee"].ToString() != "")
                    {
                        model.AgencyFee = decimal.Parse(dt.Rows[n]["AgencyFee"].ToString());
                    }
                    if (dt.Rows[n]["OutVouchFee"].ToString() != "")
                    {
                        model.OutVouchFee = decimal.Parse(dt.Rows[n]["OutVouchFee"].ToString());
                    }
                    if (dt.Rows[n]["VouchFee"].ToString() != "")
                    {
                        model.VouchFee = decimal.Parse(dt.Rows[n]["VouchFee"].ToString());
                    }
                    if (dt.Rows[n]["LoanXf"].ToString() != "")
                    {
                        model.LoanXf = decimal.Parse(dt.Rows[n]["LoanXf"].ToString());
                    }
                    if (dt.Rows[n]["LoanSx"].ToString() != "")
                    {
                        model.LoanSx = decimal.Parse(dt.Rows[n]["LoanSx"].ToString());
                    }
                    if (dt.Rows[n]["LoanZy"].ToString() != "")
                    {
                        model.LoanZy = decimal.Parse(dt.Rows[n]["LoanZy"].ToString());
                    }
                    if (dt.Rows[n]["BankQueryFee"].ToString() != "")
                    {
                        model.BankQueryFee = decimal.Parse(dt.Rows[n]["BankQueryFee"].ToString());
                    }
                    if (dt.Rows[n]["BankManageFee"].ToString() != "")
                    {
                        model.BankManageFee = decimal.Parse(dt.Rows[n]["BankManageFee"].ToString());
                    }
                    if (dt.Rows[n]["LoanBankSaleComplete"].ToString() != "")
                    {
                        model.LoanBankSaleComplete = decimal.Parse(dt.Rows[n]["LoanBankSaleComplete"].ToString());
                    }
                    if (dt.Rows[n]["EstimatePrice"].ToString() != "")
                    {
                        model.EstimatePrice = decimal.Parse(dt.Rows[n]["EstimatePrice"].ToString());
                    }
                    if (dt.Rows[n]["GJJmoney"].ToString() != "")
                    {
                        model.GJJmoney = decimal.Parse(dt.Rows[n]["GJJmoney"].ToString());
                    }
                    if (dt.Rows[n]["SYMoney"].ToString() != "")
                    {
                        model.SYMoney = decimal.Parse(dt.Rows[n]["SYMoney"].ToString());
                    }
                    if (dt.Rows[n]["OldLoanMoney"].ToString() != "")
                    {
                        model.OldLoanMoney = decimal.Parse(dt.Rows[n]["OldLoanMoney"].ToString());
                    }
                    if (dt.Rows[n]["OldRestMoney"].ToString() != "")
                    {
                        model.OldRestMoney = decimal.Parse(dt.Rows[n]["OldRestMoney"].ToString());
                    }
                    if (dt.Rows[n]["TJMoney"].ToString() != "")
                    {
                        model.TJMoney = decimal.Parse(dt.Rows[n]["TJMoney"].ToString());
                    }
                    if (dt.Rows[n]["BuildingArea"].ToString() != "")
                    {
                        model.BuildingArea = decimal.Parse(dt.Rows[n]["BuildingArea"].ToString());
                    }
                    if (dt.Rows[n]["LoanContractDate"].ToString() != "")
                    {
                        model.LoanContractDate = DateTime.Parse(dt.Rows[n]["LoanContractDate"].ToString());
                    }
                    if (dt.Rows[n]["MortgageClearDate"].ToString() != "")
                    {
                        model.MortgageClearDate = DateTime.Parse(dt.Rows[n]["MortgageClearDate"].ToString());
                    }
                    if (dt.Rows[n]["LoanComplete"].ToString() != "")
                    {
                        model.LoanComplete = DateTime.Parse(dt.Rows[n]["LoanComplete"].ToString());
                    }
                    if (dt.Rows[n]["BankLoanDate"].ToString() != "")
                    {
                        model.BankLoanDate = DateTime.Parse(dt.Rows[n]["BankLoanDate"].ToString());
                    }
                    if (dt.Rows[n]["ReceiveLoanDate"].ToString() != "")
                    {
                        model.ReceiveLoanDate = DateTime.Parse(dt.Rows[n]["ReceiveLoanDate"].ToString());
                    }
                    if (dt.Rows[n]["SendToBankDate"].ToString() != "")
                    {
                        model.SendToBankDate = DateTime.Parse(dt.Rows[n]["SendToBankDate"].ToString());
                    }
                    if (dt.Rows[n]["VoucherToBankDate"].ToString() != "")
                    {
                        model.VoucherToBankDate = DateTime.Parse(dt.Rows[n]["VoucherToBankDate"].ToString());
                    }
                    if (dt.Rows[n]["CertificateDate"].ToString() != "")
                    {
                        model.CertificateDate = DateTime.Parse(dt.Rows[n]["CertificateDate"].ToString());
                    }
                    if (dt.Rows[n]["BankCompleteDate"].ToString() != "")
                    {
                        model.BankCompleteDate = DateTime.Parse(dt.Rows[n]["BankCompleteDate"].ToString());
                    }
                    if (dt.Rows[n]["SLDate"].ToString() != "")
                    {
                        model.SLDate = DateTime.Parse(dt.Rows[n]["SLDate"].ToString());
                    }
                    if (dt.Rows[n]["SHDate"].ToString() != "")
                    {
                        model.SHDate = DateTime.Parse(dt.Rows[n]["SHDate"].ToString());
                    }
                    if (dt.Rows[n]["FKDate"].ToString() != "")
                    {
                        model.FKDate = DateTime.Parse(dt.Rows[n]["FKDate"].ToString());
                    }
                    if (dt.Rows[n]["UpSLDate"].ToString() != "")
                    {
                        model.UpSLDate = DateTime.Parse(dt.Rows[n]["UpSLDate"].ToString());
                    }
                    if (dt.Rows[n]["UpSHDate"].ToString() != "")
                    {
                        model.UpSHDate = DateTime.Parse(dt.Rows[n]["UpSHDate"].ToString());
                    }
                    if (dt.Rows[n]["UpFKDate"].ToString() != "")
                    {
                        model.UpFKDate = DateTime.Parse(dt.Rows[n]["UpFKDate"].ToString());
                    }
                    if (dt.Rows[n]["EvaluateFeeDate"].ToString() != "")
                    {
                        model.EvaluateFeeDate = DateTime.Parse(dt.Rows[n]["EvaluateFeeDate"].ToString());
                    }
                    if (dt.Rows[n]["VouchFeeDate"].ToString() != "")
                    {
                        model.VouchFeeDate = DateTime.Parse(dt.Rows[n]["VouchFeeDate"].ToString());
                    }
                    if (dt.Rows[n]["InsuranceFeeDate"].ToString() != "")
                    {
                        model.InsuranceFeeDate = DateTime.Parse(dt.Rows[n]["InsuranceFeeDate"].ToString());
                    }
                    if (dt.Rows[n]["AgencyFeeDate"].ToString() != "")
                    {
                        model.AgencyFeeDate = DateTime.Parse(dt.Rows[n]["AgencyFeeDate"].ToString());
                    }
                    if (dt.Rows[n]["OutVouchFeeDate"].ToString() != "")
                    {
                        model.OutVouchFeeDate = DateTime.Parse(dt.Rows[n]["OutVouchFeeDate"].ToString());
                    }
                    if (dt.Rows[n]["EndDate"].ToString() != "")
                    {
                        model.EndDate = DateTime.Parse(dt.Rows[n]["EndDate"].ToString());
                    }
                    if (dt.Rows[n]["EstimReportBackDate"].ToString() != "")
                    {
                        model.EstimReportBackDate = DateTime.Parse(dt.Rows[n]["EstimReportBackDate"].ToString());
                    }
                    if (dt.Rows[n]["CompleteLoanDate"].ToString() != "")
                    {
                        model.CompleteLoanDate = DateTime.Parse(dt.Rows[n]["CompleteLoanDate"].ToString());
                    }
                    if (dt.Rows[n]["TJDate"].ToString() != "")
                    {
                        model.TJDate = DateTime.Parse(dt.Rows[n]["TJDate"].ToString());
                    }
                    if (dt.Rows[n]["IsNoEvaluateFee"].ToString() != "")
                    {
                        if ((dt.Rows[n]["IsNoEvaluateFee"].ToString() == "1") || (dt.Rows[n]["IsNoEvaluateFee"].ToString().ToLower() == "true"))
                        {
                            model.IsNoEvaluateFee = true;
                        }
                        else
                        {
                            model.IsNoEvaluateFee = false;
                        }
                    }
                    if (dt.Rows[n]["IdBankReceipt"].ToString() != "")
                    {
                        if ((dt.Rows[n]["IdBankReceipt"].ToString() == "1") || (dt.Rows[n]["IdBankReceipt"].ToString().ToLower() == "true"))
                        {
                            model.IdBankReceipt = true;
                        }
                        else
                        {
                            model.IdBankReceipt = false;
                        }
                    }
                    if (dt.Rows[n]["IdZhuanBen"].ToString() != "")
                    {
                        if ((dt.Rows[n]["IdZhuanBen"].ToString() == "1") || (dt.Rows[n]["IdZhuanBen"].ToString().ToLower() == "true"))
                        {
                            model.IdZhuanBen = true;
                        }
                        else
                        {
                            model.IdZhuanBen = false;
                        }
                    }
                    if (dt.Rows[n]["IsNoAgencyFee"].ToString() != "")
                    {
                        if ((dt.Rows[n]["IsNoAgencyFee"].ToString() == "1") || (dt.Rows[n]["IsNoAgencyFee"].ToString().ToLower() == "true"))
                        {
                            model.IsNoAgencyFee = true;
                        }
                        else
                        {
                            model.IsNoAgencyFee = false;
                        }
                    }
                    if (dt.Rows[n]["IdShouBen"].ToString() != "")
                    {
                        if ((dt.Rows[n]["IdShouBen"].ToString() == "1") || (dt.Rows[n]["IdShouBen"].ToString().ToLower() == "true"))
                        {
                            model.IdShouBen = true;
                        }
                        else
                        {
                            model.IdShouBen = false;
                        }
                    }
                    if (dt.Rows[n]["IsLack"].ToString() != "")
                    {
                        if ((dt.Rows[n]["IsLack"].ToString() == "1") || (dt.Rows[n]["IsLack"].ToString().ToLower() == "true"))
                        {
                            model.IsLack = true;
                        }
                        else
                        {
                            model.IsLack = false;
                        }
                    }
                    if (dt.Rows[n]["Receipt"].ToString() != "")
                    {
                        if ((dt.Rows[n]["Receipt"].ToString() == "1") || (dt.Rows[n]["Receipt"].ToString().ToLower() == "true"))
                        {
                            model.Receipt = true;
                        }
                        else
                        {
                            model.Receipt = false;
                        }
                    }
                    if (dt.Rows[n]["Mortgage"].ToString() != "")
                    {
                        if ((dt.Rows[n]["Mortgage"].ToString() == "1") || (dt.Rows[n]["Mortgage"].ToString().ToLower() == "true"))
                        {
                            model.Mortgage = true;
                        }
                        else
                        {
                            model.Mortgage = false;
                        }
                    }
                    if (dt.Rows[n]["Status"].ToString() != "")
                    {
                        model.Status = int.Parse(dt.Rows[n]["Status"].ToString());
                    }
                    if (dt.Rows[n]["CompleteYear"].ToString() != "")
                    {
                        model.CompleteYear = int.Parse(dt.Rows[n]["CompleteYear"].ToString());
                    }
                    if (dt.Rows[n]["Total_Floor"].ToString() != "")
                    {
                        model.Total_Floor = int.Parse(dt.Rows[n]["Total_Floor"].ToString());
                    }
                    if (dt.Rows[n]["TJPercent"].ToString() != "")
                    {
                        model.TJPercent = int.Parse(dt.Rows[n]["TJPercent"].ToString());
                    }
                    model.CreateLoanGiveInfo = dt.Rows[n]["CreateLoanGiveInfo"].ToString();
                    modelList.Add(model);
                }
            }
            return modelList;
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetAllList()
        {
            return GetList("");
        }

        //*******************************************
        //功能概要       ：根据参数列表获得用户信息一览
        //参数説明       ：hsParams 参数列表
        //返回值説明     ：无
        //功能詳細       ：根据参数列表获得用户信息一览
        //作成者         ：zou.xiaochun
        //作成日         ：2010-07-14
        //*******************************************
        public DataSet GetModelListByCoditions(string strWhere, int strPageIndex, int strPageSize)
        {
            //排序
            string strOrderField = " LoanContractDate desc";
            //欲选择字段列表 
            string FieldList = " RecordId,ContractCode,LoanCode,LoanDealMode,LoanInfo,CustomerName,IDNum,Address,SalePrice_T,TJMoney,BuildingArea,GJJmoney,GJJyear,SYMoney,SYYear,LoanXf,LoanXfYear,LoanSx,LoanSxYear,LoanZy,LoanZyYear,ReceiveBank,SLDate,BankLoanDate,ReceiveLoanDate,CompleteLoanDate,EstimReportBackDate,VoucherToBankDate,CertificateDate,BankCompleteDate,TJDate,EvaluateFee,EvaluateCorp,InsuranceFee,InsuranceCorp,AgencyFee,OutVouchFee,EmpCityName,EmpCompanyName,EmpDepartName,EmployeeName,EmpPhone,TJPercent,CreateLoanGiveInfo,Receipt,Mortgage,LoanDealInfo ";
            //子查询欲选择字段列表
            StringBuilder sb = new StringBuilder();
            sb.Append(" a.RecordId,a.ContractCode,a.LoanCode,a.LoanDealMode,a.LoanInfo,a.CustomerName,a.IDNum,a.Address,(case when dbo.udf_GetTotalPrice(a.ContractCode) is not null then dbo.udf_GetTotalPrice(a.ContractCode) else SalePrice_T end) as SalePrice_T,a.TJMoney,a.BuildingArea,a.GJJmoney,a.GJJyear,a.SYMoney,a.SYYear,a.LoanXf,a.LoanXfYear,a.LoanSx,a.LoanSxYear,a.LoanZy,a.LoanZyYear,a.ReceiveBank,a.SLDate,a.BankLoanDate,a.ReceiveLoanDate,a.CompleteLoanDate,a.EstimReportBackDate,a.VoucherToBankDate,a.CertificateDate,a.BankCompleteDate,a.TJDate,a.EvaluateFee,a.EvaluateCorp,a.InsuranceFee,a.InsuranceCorp,a.AgencyFee,a.OutVouchFee,a.EmpCityName,a.EmpCompanyName,a.EmpDepartName,a.EmployeeName,a.EmpPhone,a.TJPercent,a.CreateLoanGiveInfo,a.Receipt,a.Mortgage,c.LoanInfo as LoanDealInfo ");

            //所要查询的表名
            string TableName = " t_Preliminary_SubInfo3 a left join t_Contract_BaseInfo b on a.ContractId=b.ContractId left join t_Contract_Infomation c on a.ContractId=c.ContractId ";
            return Chenxin.Lib.Business.DAL.t_Preliminary_SubInfo3.GetList(strPageIndex, strPageSize, strOrderField, TableName, strWhere, FieldList, sb.ToString(), true);
        }

        #endregion  成员方法
    }
}

